<template>
  <div>
    <el-table
      v-loading="loading"
      :data="list"
      style="width: 100%"
    >
      <el-table-column label="序号" width="60">
        <template slot-scope="scope">
          <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
        </template>
      </el-table-column>
      <el-table-column label="手机号" prop="phonenumber" />
      <el-table-column label="门店名称" prop="nickName" />
      <el-table-column label="门店用户余额" prop="balance" />
      <el-table-column label="订单数量(支付/充值)" prop="orderCount" />
      <el-table-column label="设备数量" prop="terminalCount" />
      <el-table-column label="注册时间" prop="createTime" />
    </el-table>
    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
  </div>
</template>

<script>
import { getAgentList } from "@/api/common";
export default {
  data(){
    return{
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 表格数据
      list: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userType:'04'
      }
    }
  },
  created() {
    this.getList();
  },
  methods:{
    getList() {
      this.loading = true;
      getAgentList(this.queryParams).then(response => {
        this.list = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    }
  }
}
</script>

<style>

</style>